package com.datawin.taotaocheche.ui.actviity.user;

import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.widget.TextView;

import butterknife.Bind;
import com.datawin.taotaocheche.R;
import com.datawin.taotaocheche.base.BaseActivity;
import com.datawin.taotaocheche.event.NetErrorEvent;

/**
 * Created by admin on 2017/12/2.
 */

public class AboutAct extends BaseActivity {

    @Bind(R.id.aboout_code)
    TextView code;

    @Override
    protected void setRoot() {
        setTitleBar("#FFFFFFFF");
        setContentView(R.layout.activity_about);

    }

    @Override
    protected void setup() {
        setStateText();
        setToolBar("关于我们", "");
    }


    @Override
    protected void init(@Nullable Bundle savedInstanceState) {

        String versionName = "";
        try {
            // ---get the package info---
            PackageManager pm = this.getPackageManager();
            PackageInfo pi = pm.getPackageInfo(this.getPackageName(), 0);
            versionName = pi.versionName;
            if (versionName != null && !"".equals(versionName)
                    && versionName.length() > 0) {
                code.setText("V " + versionName);
            }
        } catch (Exception e) {

        }

    }


    @Override
    public void onNetErrorEvent(NetErrorEvent event) {
        super.onNetErrorEvent(event);
    }
    @Override
    protected void onNetError(NetErrorEvent event) {

    }

    /***
     * Stop location service
     */
    @Override
    protected void onStop() {

        super.onStop();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

    }


}

